package com.zq.behavior.strategy;

import java.util.Objects;

public final class SortContext<T extends Comparable<T>> {
    private SortStrategy<T> sortStrategy;

    public void setSortStrategy(SortStrategy<T> sortStrategy) {
        this.sortStrategy = Objects.requireNonNull(sortStrategy);
    }

    public void sort(T[] ts) {
        sortStrategy.sort(ts);
    }
}
